import React from 'react';
import { Form, Row, DatePicker, Button, Select, Input, Col, Radio } from 'antd';
const FormItem = Form.Item;
const { Option } = Select;
const { RangePicker } = DatePicker

const DetailsForm = ({ form: { getFieldDecorator, getFieldsValue }, isEdit, formData }) => {

  return (
    <Form layout='vertical'>
      <Row gutter={16}>
        <Col span={6}>
          <FormItem label="机型">
            {getFieldDecorator('model', {
              initialValue: formData.model
            })(
              <Input placeholder='请输入机型' allowClear disabled />
            )}
          </FormItem>
        </Col>
        <Col span={6}>
          <FormItem label="批号">
            {getFieldDecorator('batchNo', {
              initialValue: formData.batchNo
            })(
              <Input placeholder='请输入批号' allowClear disabled />
            )}
          </FormItem>
        </Col>
        <Col span={6}>
          <FormItem label="编码">
            {getFieldDecorator('formCoding', {
              initialValue: formData.formCoding,
            })(
              <Input placeholder='请输入表格编码' disabled />
            )}
          </FormItem>
        </Col>
        <Col span={6}>
          <FormItem label="类型">
            {getFieldDecorator('isStatus', {
              initialValue: formData.isStatus || 2
            })(
              <Radio.Group disabled={!isEdit}>
                <Radio value={1}>厂外</Radio>
                <Radio value={2}>厂内</Radio>
              </Radio.Group>
            )}
          </FormItem>
        </Col>
      </Row>
    </Form>
  );
};

export default Form.create()(DetailsForm);
